package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * 检测表
 */
@Entity
@Table(name = "process", schema = "springboot", catalog = "")
public class Process {
    private int prosId;                     //检测id
    private String prosData;                //预计维修天数
    private String prosExplain;             //检测说明
    private String prosCrew;                //检测人员
    private Timestamp prosDate;             //检测开始日期
    private Timestamp prosDates;            //检测完成日期
    private Maintain maintainByTainId;

    public Process() {

    }

    public Process(int prosId, String prosData, String prosExplain, String prosCrew, Timestamp prosDate, Timestamp prosDates) {
        this.prosId = prosId;
        this.prosData = prosData;
        this.prosExplain = prosExplain;
        this.prosCrew = prosCrew;
        this.prosDate = prosDate;
        this.prosDates = prosDates;
    }

    @Id
    @Column(name = "pros_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getProsId() {
        return prosId;
    }

    public void setProsId(int prosId) {
        this.prosId = prosId;
    }

    @Basic
    @Column(name = "pros_data")
    public String getProsData() {
        return prosData;
    }

    public void setProsData(String prosData) {
        this.prosData = prosData;
    }

    @Basic
    @Column(name = "pros_explain")
    public String getProsExplain() {
        return prosExplain;
    }

    public void setProsExplain(String prosExplain) {
        this.prosExplain = prosExplain;
    }

    @Basic
    @Column(name = "pros_crew")
    public String getProsCrew() {
        return prosCrew;
    }

    public void setProsCrew(String prosCrew) {
        this.prosCrew = prosCrew;
    }

    @Basic
    @Column(name = "pros_date")
    public Timestamp getProsDate() {
        return prosDate;
    }

    public void setProsDate(Timestamp prosDate) {
        this.prosDate = prosDate;
    }

    @Basic
    @Column(name = "pros_dates")
    public Timestamp getProsDates() {
        return prosDates;
    }

    public void setProsDates(Timestamp prosDates) {
        this.prosDates = prosDates;
    }

    @ManyToOne
    @JoinColumn(name = "tain_id", referencedColumnName = "tain_id")
    public Maintain getMaintainByTainId() {
        return maintainByTainId;
    }

    public void setMaintainByTainId(Maintain maintainByTainId) {
        this.maintainByTainId = maintainByTainId;
    }
}
